package com.example.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @className OrdersCustom
 * @Description 订单的扩展类
 * 通过此类映射订单和用户查询的结果，让此类继承包括字段较多的pojo类
 * @Author YUjiangpeng
 * @Date 2020/6/16 20:55
 * @Version 1.0
 **/

@Getter
@Setter
@ToString
public class OrdersCustom extends Orders{
    /**
    * 添加属性
    **/
    private String username;
    private String sex;
    private String addr;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    @Override
    public String toString() {
        return "OrdersCustom{" +
                "id=" + super.getId() +
                ", userId=" + super.getUserId()+
                ", number='" + super.getNumber() + '\'' +
                ", createtime=" + super.getCreatetime() +
                ", note='" + super.getNote() + '\'' +
                "username='" + username + '\'' +
                ", sex='" + sex + '\'' +
                ", addr='" + addr + '\'' +
                '}';
    }
}
